package cn.schoolwow.workflow.test.module.analyzeWorkReport.audit.single.revoke.testcase;

import cn.schoolwow.quickflow.domain.FlowContext;
import cn.schoolwow.quickflow.flow.BusinessFlow;
import cn.schoolwow.workflow.domain.instance.WorkFlowInstanceStatus;
import cn.schoolwow.workflow.test.module.analyzeWorkReport.audit.single.common.CheckWorkFlowResult;
import cn.schoolwow.workflow.test.module.analyzeWorkReport.audit.single.revoke.flow.RevokeAnalyzeWorkReportFlow;
import cn.schoolwow.workflow.test.module.analyzeWorkReport.audit.single.start.StartAnalyzeWorkReportAuditFlow;
import cn.schoolwow.workflow.test.module.analyzeWorkReport.audit.single.start.SubmitAnalyzeWorkReportFlow;

public class RevokeAnalyzeWorkReportTestCaseFlow implements BusinessFlow {
    @Override
    public void executeBusinessFlow(FlowContext flowContext) throws Exception {
        flowContext.startFlow("执行-分析工作报告-撤回审批-测试用例")
                .putTemporaryData("deployName", "分析工作报告审批")
                .next(new StartAnalyzeWorkReportAuditFlow())
                .next(new SubmitAnalyzeWorkReportFlow())
                .next(new RevokeAnalyzeWorkReportFlow())
                .next(new CheckWorkFlowResult())
                .putInstanceData(WorkFlowInstanceStatus.Revoke)
                .execute();
    }

    @Override
    public String name() {
        return "分析工作报告-撤回审批-测试用例";
    }
}
